package a_buffer;

import java.io.*;

/**
 * @author Cheng-02
 * @version V1.0
 * @Package a_buffer
 * @date 2024/4/14 上午11:21
 */
public class Test02 {
    public static void main(String[] args) throws IOException {
        long start = System.currentTimeMillis();
        FileOutputStream fileOutputStream = new FileOutputStream("D:\\images\\123.jpg");
        FileInputStream fileInputStream = new FileInputStream("D:\\images\\下载.jpg");
        BufferedInputStream stream = new BufferedInputStream(fileInputStream);
        BufferedOutputStream stream1 = new BufferedOutputStream(fileOutputStream);
        int len;

        while ((len = stream.read()) != -1) {
            stream1.write(len);

        }
        long end = System.currentTimeMillis();
        System.out.println(end - start);
        stream1.close();
        stream.close();

    }
}
